@@ -5,6 +5,7 @@ from __future__ import division |
||
| 5 | 5 |
import json |
| 6 | 6 |
|
| 7 | 7 |
import requests |
| 8 |
+from django.conf import settings |
|
| 8 | 9 |
from django.db.models import Q |
| 9 | 10 |
from django_logit import logit |
| 10 | 11 |
from django_query import get_query_value |
@@ -152,7 +153,7 @@ def eqpt_result(request): |
||
| 152 | 153 |
|
| 153 | 154 |
total_active_eqpt_num = eqpts.count() |
| 154 | 155 |
has_upload_temperature_num = len(logs) |
| 155 |
- temperature_over_375 = len([1 for temperature in logs.values() if temperature > 37.5]) |
|
| 156 |
+ fever_num = len([1 for temperature in logs.values() if temperature > settings.FEVER_TEMPERATURE]) |
|
| 156 | 157 |
|
| 157 | 158 |
if kw: |
| 158 | 159 |
eqpts = eqpts.filter(Q(name__icontains=kw) | Q(phone__icontains=kw)) |
@@ -169,7 +170,7 @@ def eqpt_result(request): |
||
| 169 | 170 |
'total_active_eqpt_num': total_active_eqpt_num, |
| 170 | 171 |
'has_upload_temperature_num': has_upload_temperature_num, |
| 171 | 172 |
'not_upload_temperature_num': total_active_eqpt_num - has_upload_temperature_num, |
| 172 |
- 'temperature_over_375': temperature_over_375, |
|
| 173 |
+ 'fever_num': fever_num, |
|
| 173 | 174 |
}) |
| 174 | 175 |
|
| 175 | 176 |
|
@@ -202,7 +203,7 @@ def screen_eqpt_result(request): |
||
| 202 | 203 |
|
| 203 | 204 |
total_active_eqpt_num = eqpts.count() |
| 204 | 205 |
has_upload_temperature_num = len(logs) |
| 205 |
- temperature_over_375 = len([1 for temperature in logs.values() if temperature > 37.5]) |
|
| 206 |
+ fever_num = len([1 for temperature in logs.values() if temperature > settings.FEVER_TEMPERATURE]) |
|
| 206 | 207 |
|
| 207 | 208 |
if kw: |
| 208 | 209 |
eqpts = eqpts.filter(Q(name__icontains=kw) | Q(phone__icontains=kw)) |
@@ -246,7 +247,7 @@ def screen_eqpt_result(request): |
||
| 246 | 247 |
'total_active_eqpt_num': total_active_eqpt_num, |
| 247 | 248 |
'has_upload_temperature_num': has_upload_temperature_num, |
| 248 | 249 |
'not_upload_temperature_num': total_active_eqpt_num - has_upload_temperature_num, |
| 249 |
- 'temperature_over_375': temperature_over_375, |
|
| 250 |
+ 'fever_num': fever_num, |
|
| 250 | 251 |
}) |
| 251 | 252 |
|
| 252 | 253 |
|
@@ -1,5 +1,6 @@ |
||
| 1 | 1 |
# -*- coding: utf-8 -*- |
| 2 | 2 |
|
| 3 |
+from django.conf import settings |
|
| 3 | 4 |
from django.db import models |
| 4 | 5 |
from django.utils.translation import ugettext_lazy as _ |
| 5 | 6 |
from django_models_ext import BaseModelMixin, SexModelMixin |
@@ -175,7 +176,7 @@ class ThermometerEquipmentInfo(BaseModelMixin): |
||
| 175 | 176 |
def final_temperature_status(temperature): |
| 176 | 177 |
if not temperature: |
| 177 | 178 |
return '-' |
| 178 |
- if temperature > 37.5: |
|
| 179 |
+ if temperature > settings.FEVER_TEMPERATURE: |
|
| 179 | 180 |
return '异常' |
| 180 | 181 |
return '正常' |
| 181 | 182 |
|
@@ -317,6 +317,9 @@ DJANGO_WE_COOKIE_SALT = COOKIE_SALT |
||
| 317 | 317 |
MAKE_PASSWORD_SALT = '' |
| 318 | 318 |
MAKE_PASSWORD_HASHER = 'pbkdf2_sha256' |
| 319 | 319 |
|
| 320 |
+# 体温检测 |
|
| 321 |
+FEVER_TEMPERATURE = 37.3 |
|
| 322 |
+ |
|
| 320 | 323 |
# 开发调试相关配置 |
| 321 | 324 |
if DEBUG: |
| 322 | 325 |
try: |